package create_thread;

public class ThreadTest2 {
    public static void main(String[] args) {
        //创建任务对象
        Runnable target = new MyRunnable();  //多态的写法
        //把任务对象交给线程对象进行处理
        //public Thread(Runnable target)
        new Thread(target).start();

        for (int i = 0; i < 5; i++) {
            System.out.println("主线程输出"+i);
        }
    }
}
